import PyPDF2
import jieba as jb

with open('iphone14.txt', encoding='utf-8') as f:
    data = f.read()

cut_data = " ".join([w for w in list(jb.cut(data))])
cut_file=f"./cut_iphone14.txt"
with open(cut_file, 'w') as f:
    f.write(cut_data)
    f.close()